Forex EA simple coding question [closed]

Posted by Evgeny on Programmers See other posts from Programmers or by Evgeny
Published on 2011-02-19T17:31:12Z Indexed on 2011/02/19 23:32 UTC
Read the original article Hit count: 300

Filed under:

I simply want to close all open orders in my EA when equity reaches -250$. I found an EA online that closes all orders. It has one CloseAll() function that closes all orders. So I copied it to my EA and called it in start() function like that:

if(AccountBalance()-AccountEquity()< -250)
CloseAll();

But EA works as usual, not restarting. If any programmer would point me in the right direction that would be great.

© Programmers or respective owner

Related posts about programming